package com.whereareyou.model;

import java.io.Serializable;

/**
 * Created by 家玮 on 2014/7/26.
 */
public class RelationshipPK implements Serializable {
    String User1;
    String user2;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RelationshipPK that = (RelationshipPK) o;

        if (User1 != null ? !User1.equals(that.User1) : that.User1 != null) return false;
        if (user2 != null ? !user2.equals(that.user2) : that.user2 != null) return false;

        return true;
    }

    public String getUser2() {
        return user2;
    }

    public void setUser2(String user2) {
        this.user2 = user2;
    }

    public String getUser1() {
        return User1;
    }

    public void setUser1(String user1) {
        User1 = user1;
    }

    @Override
    public int hashCode() {
        int result = User1 != null ? User1.hashCode() : 0;
        result = 31 * result + (user2 != null ? user2.hashCode() : 0);
        return result;
    }
}
